import { getToken } from "../utils/tools";
import { Navigate } from "react-router-dom";
function ProtectedRouter({ children }) {
  return getToken() ? children : <Navigate to="/login"></Navigate>;
}

export default ProtectedRouter;
